function DominoPiece(topPips, bottomPips, sprite) {

	this.topPips = topPips;
	this.bottomPips = bottomPips;	
	
	this.sprite = sprite;
}

DominoPiece.prototype.toString = function() {
	return this.topPips + "/" + this.bottomPips;
}

DominoPiece.prototype.invert = function() {
	
	var topPipsBuffer = this.topPips;
	
	this.topPips = this.bottomPips;
	this.bottomPips = topPipsBuffer;
	
	this.sprite.initDrawPipsFunctions(this.topPips, this.bottomPips);
}

DominoPiece.prototype.isDouble = function() {	
	return this.topPips === this.bottomPips;
}